<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BDateEdit</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BDateEdit">
			<h1>BDateEdit</h1>
			<p>继承自<a href="BWidget.html">BWidget</a></p>
			<p id="resume">BDateEdit是日期编辑框，以指定的格式显示日期文本。<a href="#desc">详细</a></p>
			<h2>public</h2>
			<table id="public">
				<tr><td align="right"/><td><a href="#BDateEdit(BWidget*)">BDateEdit</a>(BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#BDateEdit(const BDate&,BWidget*)">BDateEdit</a>(const BDate& date, BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#~BDateEdit()">~BDateEdit</a>();</td></tr>
				<tr><td align="right">void </td><td><a href="#setDate(const BDate&)">setDate</a>(const BDate& date);</td></tr>
				<tr><td align="right">const BDate&amp; </td><td><a href="#date()">date</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setFormat(const BString&)">setFormat</a>(const BString& format);</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#format()">format</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setAlign(Align)">setAlign</a>(Align align);</td></tr>
				<tr><td align="right">Align </td><td><a href="#align()">align</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setReadOnly(bool)">setReadOnly</a>(bool readOnly);</td></tr>
				<tr><td align="right">bool </td><td><a href="#readOnly()">readOnly</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setSynchro(bool)">setSynchro</a>(bool synchro);</td></tr>
				<tr><td align="right">bool </td><td><a href="#synchro()">synchro</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setTextFormat(BTextFormat*)">setTextFormat</a>(BTextFormat* textFormat);</td></tr>
				<tr><td align="right">const BTextFormat* </td><td><a href="#textFormat()">textFormat</a>() const;</td></tr>
				<tr><td align="right">BTextFormat* </td><td><a href="#textFormat()">textFormat</a>();</td></tr>
				<tr><td align="right">virtual BSize </td><td><a href="#sizeHint()">sizeHint</a>() const;</td></tr>
			</table>
			<h2>protected</h2>
			<table id="protected">
				<tr><td align="right">virtual void </td><td><a href="#resizeEvent(const BEvent&)">resizeEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#updateEvent(const BEvent&)">updateEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#styleEvent(const BEvent&)">styleEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#freshEvent(const BEvent&)">freshEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#paintEvent(const BEvent&)">paintEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#focusEvent(const BEvent&)">focusEvent</a>(const BEvent& focusEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#inputEvent(const BEvent&)">inputEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#keyPressEvent(const BKeyEvent&)">keyPressEvent</a>(const BKeyEvent& keyEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#keyReleaseEvent(const BKeyEvent&)">keyReleaseEvent</a>(const BKeyEvent& keyEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseEnterEvent(const BMouseEvent&)">mouseEnterEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseLeaveEvent(const BMouseEvent&)">mouseLeaveEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mousePressEvent(const BMouseEvent&)">mousePressEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseReleaseEvent(const BMouseEvent&)">mouseReleaseEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseMoveEvent(const BMouseEvent&)">mouseMoveEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseWheelEvent(const BMouseEvent&)">mouseWheelEvent</a>(const BMouseEvent& wheelEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseDoubleClickEvent(const BMouseEvent&)">mouseDoubleClickEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p>BDateEdit是日期编辑框，以指定的格式显示日期文本。</p><p>文本格式的关键词分别是年（Y/y），月（M/m），日（D/d）。忽略大小写，连续多个字符表示其位数，如默认的格式为：YYYY-MM-DD表示年数为四个数字，月数为二个数字，天数为二个数字，三者之间都以'-'作间隔。</p><p>注意文本格式需要保持年月日的顺序，这在编辑时用于提取各分量的数值。</p><h4>信号表：</h4><table>
					<tr><td>Signal_DateChanged</td><td>日期值改变时发出，值为：BDate date。</td></tr>
					<tr><td>Signal_ReadOnly</td><td>只读模式改变时发出，值为：bool readOnly。</td></tr>
					<tr><td>Signal_EditFinished</td><td>编辑操作完成时发出，值为：BDate date。</td></tr>
					<tr><td>Signal_DateEdited</td><td>日期文本被编辑时发出，值为：BDate date。</td></tr>
					<tr><td>Signal_FormatChanged</td><td>文本格式被改变时发出， 值为：BString format。</td></tr></table>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BDateEdit(BWidget*)">
				<h3>BDateEdit(BWidget* parent = 0);</h3>
				<p>构造一个日期编辑框，parent指定其父控件。</p>
			</div>
			<div id="BDateEdit(const BDate&,BWidget*)">
				<h3>BDateEdit(const BDate&amp; date, BWidget* parent = 0);</h3>
				<p>构造一个日期编辑框，date指定其初始日期，parent指定其父控件。</p>
			</div>
			<div id="~BDateEdit()">
				<h3>~BDateEdit();</h3>
				<p>析构一个日期编辑框。</p>
			</div>
			<div id="setDate(const BDate&)">
				<h3>void setDate(const BDate&amp; date);</h3>
				<p>设置日期值。</p>
			</div>
			<div id="date()">
				<h3>const BDate&amp; date() const;</h3>
				<p>获得日期值。</p>
			</div>
			<div id="setFormat(const BString&)">
				<h3>void setFormat(const BString&amp; format);</h3>
				<p>设置格式字符串。</p>
			</div>
			<div id="format()">
				<h3>const BString&amp; format() const;</h3>
				<p>获得格式字符串。</p>
			</div>
			<div id="setAlign(Align)">
				<h3>void setAlign(Align align);</h3>
				<p>设置文本显示对齐方式。</p>
			</div>
			<div id="align()">
				<h3>Align align() const;</h3>
				<p>获得文本显示对齐方式。</p>
			</div>
			<div id="setReadOnly(bool)">
				<h3>void setReadOnly(bool readOnly);</h3>
				<p>设置只读模式。</p>
			</div>
			<div id="readOnly()">
				<h3>bool readOnly() const;</h3>
				<p>获得当前是否为只读模式。</p>
			</div>
			<div id="setSynchro(bool)">
				<h3>void setSynchro(bool synchro);</h3>
				<p>设置当前是否同步实时日期值。</p>
			</div>
			<div id="synchro()">
				<h3>bool synchro() const;</h3>
				<p>获得当前是否同步实时日期值。</p>
			</div>
			<div id="setTextFormat(BTextFormat*)">
				<h3>void setTextFormat(BTextFormat* textFormat);</h3><p>设置文本格式对象。</p>
			</div>
			<div id="textFormat()">
				<h3>const BTextFormat* textFormat() const;</h3><p>获得文本格式对象。</p>
			</div>
			<div id="textFormat()">
				<h3>BTextFormat* textFormat();</h3><p>获得文本格式对象。</p>
			</div>
			<div id="sizeHint()">
				<h3>virtual BSize sizeHint() const;</h3>
				<p>计算格式字符串显示需要的空间。</p>
			</div>
			<div id="resizeEvent(const BEvent&)">
				<h3>virtual void resizeEvent(const BEvent&amp; event);</h3>
				<p>标记此日期框需要重新调整。</p>
			</div>
			<div id="updateEvent(const BEvent&)">
				<h3>virtual void updateEvent(const BEvent&amp; event);</h3>
				<p>同步更新当前日期值，刷新输入光标的闪烁。</p>
			</div>
			<div id="styleEvent(const BEvent&)">
				<h3>virtual void styleEvent(const BEvent&amp; event);</h3><p>样式表取值：</p><table>
					<tr><td>Value_Align</td><td>设置文本对齐方式，值为：Align align。</td></tr>
					<tr><td>Value_Format</td><td>设置日期的文本格式，值为：BString format。</td></tr></table>
			</div>
			<div id="freshEvent(const BEvent&)">
				<h3>virtual void freshEvent(const BEvent&amp; event);</h3><p>重新调整显示布局，以及输入光标。</p>
			</div>
			<div id="paintEvent(const BEvent&)">
				<h3>virtual void paintEvent(const BEvent&amp; event);</h3><p>绘制日期的文本。</p>
			</div>
			<div id="focusEvent(const BEvent&)">
				<h3>virtual void focusEvent(const BEvent&amp; focusEvent);</h3><p>获得焦点时选中所有文本。</p>
			</div>
			<div id="inputEvent(const BEvent&)">
				<h3>virtual void inputEvent(const BEvent&amp; event);</h3><p>输入日期数值。</p>
			</div>
			<div id="keyPressEvent(const BKeyEvent&)">
				<h3>virtual void keyPressEvent(const BKeyEvent&amp; keyEvent);</h3><p>编辑日期数值文本。</p>
			</div>
			<div id="keyReleaseEvent(const BKeyEvent&)">
				<h3>virtual void keyReleaseEvent(const BKeyEvent&amp; keyEvent);</h3><p>编辑日期数值文本。</p>
			</div>
			<div id="mouseEnterEvent(const BMouseEvent&)">
				<h3>virtual void mouseEnterEvent(const BMouseEvent&amp; mouseEvent);</h3><p>更新悬停状态。</p>
			</div>
			<div id="mouseLeaveEvent(const BMouseEvent&)">
				<h3>virtual void mouseLeaveEvent(const BMouseEvent&amp; mouseEvent);</h3><p>更新悬停状态。</p>
			</div>
			<div id="mousePressEvent(const BMouseEvent&)">
				<h3>virtual void mousePressEvent(const BMouseEvent&amp; mouseEvent);</h3><p>更新输入光标位置，以及鼠标按下状态。</p>
			</div>
			<div id="mouseReleaseEvent(const BMouseEvent&)">
				<h3>virtual void mouseReleaseEvent(const BMouseEvent&amp; mouseEvent);</h3><p>更新鼠标按下状态。</p>
			</div>
			<div id="mouseMoveEvent(const BMouseEvent&)">
				<h3>virtual void mouseMoveEvent(const BMouseEvent&amp; mouseEvent);</h3><p>更新鼠标悬停位置。</p>
			</div>
			<div id="mouseWheelEvent(const BMouseEvent&)">
				<h3>virtual void mouseWheelEvent(const BMouseEvent&amp; wheelEvent);</h3><p>滚轮调整天数增加或减少。</p>
			</div>
			<div id="mouseDoubleClickEvent(const BMouseEvent&)">
				<h3>virtual void mouseDoubleClickEvent(const BMouseEvent&amp; mouseEvent);</h3><p>双击选择单个词。</p>
			</div>
		</div>
	</body>
</html>